
<div class="pageContent">
    <form method="post" id="updateProcessModelCategoryFrom" action="${rc.getContextPath()}/manage/model/modifyModelCategory" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone)">
        <div class="pageFormContent nowrap" layoutH="58">
        <input name="navTabId" value="${navTabId!''}" type="hidden" />
        <fieldset>
            <legend><@label key="edit_model_type.B">编辑类型</@label></legend>
            <dl>
                <dt><@label key='name.C,colon'>名称：</@label></dt>
                <dd><input type="text" name="name" class="required" value="${processModelCategory.name!''}" readonly="readonly"/></dd>
            </dl>
            <dl>
                <dt><@label key='code.C,colon'>编码：</@label></dt>
                <dd><input type="text" name="category"  readonly="readonly" value="${processModelCategory.category!''}"/> </dd>
            </dl>
            <dl class="nowrap">
					<dt><@label key="businessType.C,colon">业务类型:</@label></dt>
					<dd>
						<select name="businessType" disabled="disabled">
						  <option value=""></option>
						 <#list businessTypes as type>
							<option value="${type.businessType}"<#if type.businessType?? && type.businessType == processModelCategory.businessType> selected="selected"</#if>>${type.businessType}-${type.businessTypeText}</option> </#list>
						</select>
					</dd>
				</dl>
            <dl class="nowrap">
                <dt><@label key='description.C,colon'>描述：</@label></dt>
                <dd><textarea class="textInput" cols="30" rows="4" name="description" readonly="readonly">${processModelCategory.description!''}</textarea></dd>
            </dl>
            <dl>
                <dt>&nbsp;</dt>
                <dd id="modelCategory_button">
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="submit" onclick="_editModelCategory()"><@label key="edit.B">编辑</@label></button>
                        </div>
                    </div>
                </dd>
            </dl>
        </fieldset>
        </div>
    </form>
</div>

<script type="text/javascript">
    $(function(){
        var _modelEdit = "<@buttonRight menuCode='modelCategory_edit' labelKey='edit.B' defalutName='编辑'></@buttonRight>";
        if(_modelEdit && _modelEdit!=''){
            $("#modelCategory_button").html("<div class='buttonActive'><div class='buttonContent'><button onclick='_editModelCategory()' type='button'><@label key='edit.B'>编辑</@label></button></div></div>");
        }else{
            $("#modelCategory_button").html("<div class='buttonDisabled'><div class='buttonContent'><button type='button'><@label key='edit.B'>编辑 </@label></button></div></div>");
        }
    })
    function _editModelCategory() {
        $("#updateProcessModelCategoryFrom").find("[readonly='readonly'],[disabled='disabled']").each(function(){
            if($(this).attr("name")!='category'){
                $(this).removeAttr("readonly");
                $(this).removeAttr("disabled");
                $(this).removeClass("readonly");
            }
        });
        $("#modelCategory_button").html("<div class='buttonActive'><div class='buttonContent'><button type='submit'><@label key='save.B'>保存 </@label></button></div></div>");
    }
</script>